﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using SharedGenomics.Core;

namespace SharedGenomics.Workbench.PresentationModel
{
    //TODO: move this to the domain or annotation namespace?
    public class KeggPathwayFrequency
    {
        private string _name;
        private int _frequency;

        public KeggPathwayFrequency(string name, int frequency)
        {
            this.PathwayName = name;
            this.Frequency = frequency;
        }

        public string PathwayName
        {
            get { return this._name; }
            set
            {
                ExceptionHelper.ThrowIf<ArgumentException>(value.IsEmptyOrWhitespace(), "Pathway name cannot be null or empty");
                this._name = value;
            }
        }

        public int Frequency
        {
            get { return this._frequency; }
            set
            {
                ExceptionHelper.ThrowIf<ArgumentOutOfRangeException>(value < 0, "Frequency cannot be less than zero");
                this._frequency = value;
            }
        }
    }
}
